<?php

class Admin_Form_Parametros extends Zend_Form {

    
    public function init() 
    {
   	    
        $front = Zend_Controller_Front::getInstance();
        $controller = $front->getRequest()->getControllerName();
        $module = $front->getRequest()->getModuleName();
        $url = $front->getBaseUrl().'/'.$module.'/'.$controller;
        
        Zend_Loader::loadClass('dominio','library');
        
        $el = new Zend_Form_Element_Hidden('PAR_ID',array('disableLoadDefaultDecorators' =>true));
        $el->addDecorators(array(array('ViewHelper'),array('Errors')))
            ->addFilter('Int');
        $this->addElement($el);
        
        $el = new Zend_Form_Element_Text('PAR_NOM');
        $el->setLabel('Nome');
        $this->addElement($el);
        
        $el = new Zend_Form_Element_Text('PAR_TEL');
        $el->setLabel('Telefone');
        $this->addElement($el);
        
        $el = new Zend_Form_Element_Text('PAR_EML');
        $el->setLabel('E-mail');
        $this->addElement($el);
        
        $el = new Zend_Form_Element_Text('PAR_EMLCNT');
        $el->setLabel('E-mail Contato');
        $this->addElement($el);
        
        $el = new Zend_Form_Element_Text('PAR_END');
        $el->setLabel('Endereço');
        $this->addElement($el);
        
        $el = new Zend_Form_Element_Text('PAR_FAC');
        $el->setLabel('Facebook');
        $this->addElement($el);
        
        $el = new Zend_Form_Element_Text('PAR_TWI');
        $el->setLabel('Twitter');
        $this->addElement($el);
        
        $el = new Zend_Form_Element_Text('PAR_INS');
        $el->setLabel('Instragram');
        $this->addElement($el);
        
        
        $el = new Zend_Form_Element_Text('PAR_PERSEM');
        $el->setLabel('Percentual de semelhança pesquisa');
        $this->addElement($el);
        
        $el = new Zend_Form_Element_Text('PAR_NUMPAG');
        $el->setLabel('Número de Paginação');
        $this->addElement($el);
        
        
        $arr = dominio::modeloImpresoras();
        $el = new Zend_Form_Element_Select('PAR_MRCIMP',array('onchange' => ''));
        $el->setLabel('Marca da Impressora Padrão')
        ->addMultiOptions($arr);
        $this->addElement($el);
        
        /*
        $el = new Zend_Form_Element_Textarea('PAR_DADCHQ');
        $el->setLabel('Dados Pagamento com Cheque');
        $this->addElement($el);
        
        $el = new Zend_Form_Element_Textarea('PAR_DADDEPCNT');
        $el->setLabel('Dados Pagamento Depósito Bancário');
        $this->addElement($el);
        */
        $btn = new Zend_Form_Element_Submit('submit',array('disableLoadDefaultDecorators' =>true));
        $btn->addDecorators(array(array('ViewHelper'),array('Errors')));
        $btn->setLabel('Gravar');
        $btn->setAttrib('id', 'submitbutton');
        $btn->setAttrib('class', 'btn-frm');
        $this->addElement($btn);
        
        $btn = new Zend_Form_Element_Button('Cancelar',array('disableLoadDefaultDecorators' =>true));
        $btn->setDecorators(array(array('Description', array('escape' => false, 'tag' => false))));
        $btn->setDescription('<a href="'.$url.'" class="btn-frm">Cancelar</a>');
        $btn->setAttrib('id', 'btncancel');
        $btn->setAttrib('class', 'btn-frm');
        $this->addElement($btn);
        
        
    }

}

